In [1]:
import plotly.express as px
import plotly
from PIL import Image
from matplotlib import pyplot as plt
In [2]:
# required for rndering correctrly on an HTML
# https://stackoverflow.com/a/58718006/
plotly.offline.init_notebook_mode()

Some Example Title 2¶

A link

A Table¶

X Y
1 1.2
2 5

A Dynamic JS-based Graph¶

In [8]:
# generate 100 random numbers for x and y
x = np.random.randn(1000)
y = np.random.randn(1000)
In [12]:
# if x is smaller than 0 make it red
# if x is larger than 0 make it blue
colors = ['red' if i < 0 else 'blue' for i in x]

# create a scatter plot
fig = px.scatter(x=x, y=y, color=colors)

# render the plot
plotly.offline.iplot(fig)

An Image¶